#!/bin/sh

# publish an ogg video+audio smoke-muxed stream on TCP and UDP for direct access

HOST=$1
VIDEOPORT=$2
AUDIOPORT=$3

gst-launch v4l2src ! queue ! video/x-raw-yuv,width=320,height=240,framerate=\(fraction\)4/1 ! videorate ! videoscale ! ffmpegcolorspace ! queue ! smokeenc ! queue ! udpsink host=${HOST} port=${VIDEOPORT} alsasrc ! queue ! audio/x-raw-int,rate=8000,channels=1,depth=8 ! audioconvert ! speexenc ! queue ! tcpserversink host=${HOST} port=${AUDIOPORT}
